﻿Public Class SupportForm 

    Private Sub btnSend_Click(sender As Object, e As EventArgs) Handles btnSend.Click
        Try
            Me.Cursor = Cursors.WaitCursor

            Dim mail As CommonExt.Utils.EmailExt = New CommonExt.Utils.EmailExt(AppManager.SMTPServer)

            '
            ' Mettre en commentaire pour enlever le print screen de l'écran
            '
            'Dim att As System.Net.Mail.Attachment
            ''
            mail.From = AppManager.SupportFROM
            mail.To = AppManager.SupportTO
            'mail.Cc = MetaValue.GetMetaValueByCode("OPT_PAYMASTER_EMAIL").Value
            mail.Subject = String.Format("CREQ: {0}", Me.txtSubject.Text)
            mail.Body = "Date : " + Date.Now.ToString("yyyy/MM/dd HH:mm") + "<BR>" +
                        "UserName : " + AppManager.UserName + "<BR>" +
                        "ServerName : " + AppManager.DbServerName + "<BR>" +
                        "DBName : " + AppManager.DbName + "<BR>" + "<BR>" +
                        "Subject :" + "<BR>" +
                        Me.txtSubject.Text + "<BR><BR>" +
                        "Support Request :" + "<BR>" +
                        Me.meDescription.Text.Replace(vbCrLf, "<BR>") + "<BR><BR>"

            mail.Message.IsBodyHtml = True
            mail.SendMessage()

        Catch ex As System.Exception
            MsgBox(ex.Message)
        Finally
            Me.Cursor = Cursors.Default
        End Try
    End Sub
End Class